//index.js  提供访问接口的api
import myaxios from "@/myaxios/myaxios"
import URL_ENV from "@/myaxios/BaseUrl"

const BMDURL = URL_ENV.BMDURL
const actorApi = {
    /**
     * 通过产品类型查询产品列表
     */
    queryBytype(params) {
        const url = BMDURL + "/chanpin?type2=" + params
        return myaxios.get(url, params)
    },
    queryByUid(params){
        const url = BMDURL + '/gouwuche?uid=' + params
        return myaxios.get(url,params)
    },
    queryByUidYonghu(params){
        const url = BMDURL + '/yonghu?uid=' + params
        return myaxios.get(url,params)
    },
    /**
     * 修改管理员
     */
    updateById(params) {
        const url = BMDURL + "/guanli/" + params.id
        return myaxios.put(url, params)
    },
    // 增加管理员
    addUser(params) {
        const url = BMDURL + "/guanli"
        return myaxios.post(url, params)
    }
}

export default actorApi